package com.lz.ovuola.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

@Table(name = "physiological_referencev_data", uniqueConstraints = { @UniqueConstraint(columnNames = { "id" }) })
@Entity(name = "physiologicalReferencevDataDo")
public class PhysiologicalReferencevDataDo extends BaseDo {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4237905184668067234L;

	@Id
	@GeneratedValue
	private int id;

	/**
	 * 基准值
	 */
	@Column(name = "reference_value")
	private Float referenceValue;

	/**
	 * 阈值
	 */
	@Column(name = "threshold")
	private Float threshold;

	/**
	 * user_id
	 */
	@Column(name = "user_id")
	private Integer userId;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time")
	private Date createTime;
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time")
	private Date updateTime;

	public PhysiologicalReferencevDataDo() {
		super();
		// TODO Auto-generated constructor stub
	}

	public PhysiologicalReferencevDataDo(Float referenceValue, Float threshold,
			Integer userId) {
		super();
		final Date NOW = new Date();
		this.referenceValue = referenceValue;
		this.threshold = threshold;
		this.userId = userId;
		this.createTime = NOW;
		this.updateTime = NOW;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Float getReferenceValue() {
		return referenceValue;
	}

	public void setReferenceValue(Float referenceValue) {
		this.referenceValue = referenceValue;
	}

	public Float getThreshold() {
		return threshold;
	}

	public void setThreshold(Float threshold) {
		this.threshold = threshold;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
}
